﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="leaveword_parameter.aspx.cs" Inherits="YXShop.Web.admin.templates.label.leaveword_parameter" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../../style/admin.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">

    function ReturnValue()
    {
     var ShowRows = document.getElementById("Tb_rows").value;//显示行数
     var ShowColumns = document.getElementById("Tb_Columns").value;//显示列数
     var WhetherPagination;
     o=document.getElementsByName("rbl_page");//是否分页
      var len=o.length;   
      for (var i=0;i<len ;i++ )
       {
          if( o[i].checked==true )
           {
             WhetherPagination=o[i].value;
            }
       }
       
      var IsStoreLeaveWord;
      o=document.getElementsByName("rblLeaveWord");//是否是店铺留言
      var len=o.length;   
      for (var i=0;i<len ;i++ )
       {
          if( o[i].checked==true )
           {
              IsStoreLeaveWord=o[i].value;
           }
       }
       
      var TempletLayout;      
      var o=document.getElementsByName("Rbl_TempletLayout");//布局方式
      var len=o.length;   
      for (var i=0;i<len ;i++ )       
       {
          if( o[i].checked==true )
          {
             TempletLayout=o[i].value;
           }
      }
       //自定义内容
        var oEditor = FCKeditorAPI.GetInstance("fckLabelContent");//读fck内容
        var mystyle = oEditor.GetXHTML(true);
	
	var cnm ="[YX:Loop,YX:LableType=LeaveWrod,YX:Option=LeaveWrodInfo,YX:ShowRows="+ ShowRows+",YX:ShowColumns="+ShowColumns+
	",YX:TempletLayout="+TempletLayout+",YX:WhetherPagination="+WhetherPagination+",YX:IsStoreLeaveWord="+IsStoreLeaveWord+"]"+mystyle+"[/YX:Loop]";
	 
    parent.getValue(cnm);
	 CloseDiv();

}

function getValue(value)
{  
    if(value!="") 
    {
        var oEditor = FCKeditorAPI.GetInstance("fckLabelContent");
        if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
        {
           oEditor.InsertHtml(""+value+"");
        }
        
        else
        {
        return false;
        }
    }
}
function CloseDiv()
{
    parent.document.getElementById("LabelDivid").style.display="none";
}

</script>
</head>
<body>
<form id="form1" runat="server">
<div>
     <table cellpadding="1" cellspacing="1"  style="width: 99%; margin-top:5px" class="form_table_input">
     <tr>
        <td>显示信息 </td>
        <td>
          <asp:DropDownList ID="dd_Condtion" runat="server" Height="25px" Width="151px" 
          onchange="javascript:getValue(this.value);">
                <asp:ListItem Value="">--请选择显示信息--</asp:ListItem>
                <asp:ListItem Value="[#Leave_Name]">留言人</asp:ListItem>
                <asp:ListItem Value="[#Leave_Address]">联系地址</asp:ListItem>
                <asp:ListItem Value="[#Leave_Time]">留言时间</asp:ListItem>
                <asp:ListItem Value="[#Leave_Title]">留言主题</asp:ListItem>
                <asp:ListItem Value="[#Leave_Content]">留言内容</asp:ListItem>
                <asp:ListItem Value="[#Leave_IP]">留言人IP</asp:ListItem>
                <asp:ListItem Value="[#Leave_Email]">留言人Email</asp:ListItem>
                <asp:ListItem Value="[#Leave_QQ]">留言人QQ</asp:ListItem>
                <asp:ListItem Value="[#Leave_RevertContent]">回复内容</asp:ListItem>
                <asp:ListItem Value="[#Leave_RevertTime]">回复时间</asp:ListItem>
         </asp:DropDownList>
       </td>
       
        <td>布局方式</td>
        <td>
            <asp:RadioButtonList ID="Rbl_TempletLayout" runat="server" Height="26px" 
             RepeatDirection="Horizontal" Width="116px">
                <asp:ListItem Value="0" Selected="True">Div</asp:ListItem>
                <asp:ListItem Value="1">Table</asp:ListItem>
             </asp:RadioButtonList>
        </td>
     </tr>
            
     <tr>
         <td>显示几行</td>
         <td>
             <asp:TextBox ID="Tb_rows" runat="server" Width="147px"  onkeyup="value=value.replace(/[^\d]/g,'') " 
                        onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" >2</asp:TextBox>
         </td>
         
         <td>显示几列</td>
         <td>
             <asp:TextBox ID="Tb_Columns" runat="server" Width="147px"  onkeyup="value=value.replace(/[^\d]/g,'') " 
                        onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" >2</asp:TextBox>
         </td>
      </tr>
            
     <tr>
          <td>是否分页</td>
          <td>
              <asp:RadioButtonList ID="rbl_page" runat="server" RepeatDirection="Horizontal">
                 <asp:ListItem Value="0" Selected="True">分页</asp:ListItem>
                 <asp:ListItem Value="1">不分页</asp:ListItem>
              </asp:RadioButtonList>
          </td>
          <td>留言类型</td>
          <td>
          <asp:RadioButtonList ID="rblLeaveWord" runat="server" RepeatDirection="Horizontal">
                 <asp:ListItem Value="0" Selected="True">商城留言</asp:ListItem>
                 <asp:ListItem Value="1">店铺留言</asp:ListItem>
              </asp:RadioButtonList>
          </td>
      </tr>
            
     <tr>
           <td colspan="4">
                      <FCKeditorV2:FCKeditor ID="fckLabelContent" runat="server"  BasePath="~/controls/fckeditor/"  Height="200px">
                 </FCKeditorV2:FCKeditor>
           </td>
     </tr>
            
     <tr>
          <td colspan="4" align="center" style="text-align:center">
              <input id="bt_Exc" type="button" value="提交" onclick="ReturnValue()" />&nbsp;
              <input type="button" value=" 关闭 "  onclick="javascript:CloseDiv();" />
           </td>
     </tr>
    </table>
</div>
</form>
</body>
</html>
